Telegram Group & Telegram Channel
​​"Быстрый" контейнер deque

Встроенных списков в Python иногда может не хватать, поэтому покажем одну хорошую альтернативу. Deque может быть реализован c помощью модуля collections.

Deque предпочтительнее, чем обычный список, в тех случаях, когда нам нужны более быстрые операции добавления и вытягивания элементо из обоих концов контейнера, поскольку deque обеспечивает линейную сложность O(1) для операций добавления и выталкивания по сравнению со списком, у которого сложность по времени для тех операций составляет O(n).

Также для deque есть возможность использовать стандартные функции по типу sum, min, max и тому подобные.
👍1



tg-me.com/python_academy/69
Create:
Last Update:

​​"Быстрый" контейнер deque

Встроенных списков в Python иногда может не хватать, поэтому покажем одну хорошую альтернативу. Deque может быть реализован c помощью модуля collections.

Deque предпочтительнее, чем обычный список, в тех случаях, когда нам нужны более быстрые операции добавления и вытягивания элементо из обоих концов контейнера, поскольку deque обеспечивает линейную сложность O(1) для операций добавления и выталкивания по сравнению со списком, у которого сложность по времени для тех операций составляет O(n).

Также для deque есть возможность использовать стандартные функции по типу sum, min, max и тому подобные.

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/69

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.

How To Find Channels On Telegram?

There are multiple ways you can search for Telegram channels. One of the methods is really logical and you should all know it by now. We’re talking about using Telegram’s native search option. Make sure to download Telegram from the official website or update it to the latest version, using this link. Once you’ve installed Telegram, you can simply open the app and use the search bar. Tap on the magnifier icon and search for a channel that might interest you (e.g. Marvel comics). Even though this is the easiest method for searching Telegram channels, it isn’t the best one. This method is limited because it shows you only a couple of results per search.

Python Academy from tr


Telegram Python Academy
FROM USA